

const obj2gltf = require('obj2gltf');
const fs = require('fs');
let path = require('path');
let dir = __dirname;
console.log(dir);
obj2gltf(dir + '/monkey.obj')
    .then(function(gltf) {
        const data = Buffer.from(JSON.stringify(gltf));
        fs.writeFileSync(dir+'/monkey.gltf', data);
    });
